<template>
	<div class="content">
		<img class="done_img" src="../../assets/sucTips.png" alt="">
		<div class="done_title">记忆快速测评完成</div>
		<div class="done_exp">请继续参加测评</div>
		<div v-on:click="nextTest" class="continueBtn">完成</div>
	</div>
</template>

<script>
	import api from "@/api";
	import Cookies from 'js-cookie';
	import Vue from 'vue';
	import { Toast } from 'vant';
	export default {
		components: { },
		name: 'emt-end',
		data() {
			return {
				saving:false
			};
		},
		computed: {
			
		},
		async mounted() {
			this.finish();
		},
		methods: {
			nextTest(){
				if(this.saving==true){
					return;
				}
				this.commonApi.nextRoute(this.$route.query.route)
			},
			async finish(){
				this.saving=true;
				let params={
					masterId:Cookies.get('masterId')
				};
				try {
				  let res = await api.updateFinishStatus(params);
				  if (res.code == 1) {
					this.saving=false;
				  }else{
					this.saving=false;
				  }
				} catch (e) {
					this.saving=false;
				  console.log(e);
				}
			}
		}
	};
</script>

<style scoped>
.content{
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
.done_img{
	width: 126px;
	height: 126px;
	margin-top: -50%;
}
.done_title{
	margin-top: 20px;
	font-size: 20px;
	color:#333333;
	font-weight: 400;
}
.done_exp{
	font-size: 14px;
	color: #999999;
	margin-top: 14px;
}
.continueBtn{
	width: 315px;
	background-color: #4174F7;
	border-radius: 22px;
	padding: 8px 0;
	font-size: 16px;
	color: #ffffff;
	text-align: center;
	position: absolute;
	bottom: 19%;
}
</style>